import request from '@/api/request'

export const getCode = phone => {
  return request.get(`/captcha/sent?phone=${phone}`)
}

export const checkCode = (phone, code) => {
  return request.get(`/captcha/verify?phone=${phone}&captcha=${code}`)
}

export const getToken = (phone, code) => {
  return request.get(`/login/cellphone?phone=${phone}&captcha=${code}`)
}
